import React, { Component } from "react";
import { createIncreatementAction } from "../../redux/actions/count";
import { connect } from "react-redux";

class Text extends Component {
    increatement = () => {
        this.props.jia(1)
    }
    render() {
        return (
            <div>
                和为：{this.props.count}
                <button onClick={this.increatement}>+</button>
            </div>
        );
    }
}

export default connect((state) => ({ count: state.count }), {
    jia: createIncreatementAction,
})(Text);
